//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<IEntity.h>
///	@path	~/src/scene/
///	@date	2007/11/01
///	@desc	All interactive objects abstraction in the game world.

#pragma once

#include "xeres.h"

#include "lib/math/vector.h"
#include "lib/math/matrix.h"

#include "scene/ILive.h"

namespace xeres {

	// forward declaration
	class IScene;
	class IAttribute;
	class RenderContext;

	// entity ID

	typedef int32 EntityID;

	/*!
		\class	IEntity
		\brief
	*/
	class IEntity : public ILive
	{
	public:

		/// \ctor
		IEntity( void );

		/// \dtor
		virtual ~IEntity( void );

		DECL_IOBJECT_INTERFACE( IEntity , ILive );

	public:

		// interface

		/*!
			\brief		Get entity's attribute.
						Attribute must be registered before using.
		*/
		virtual RefWeak<IAttribute> GetAttribute( int attributeID ) = 0;


		// entity basic attribute

		/*!
			\brief		Get entity id.
		*/
		EntityID GetID( void ) const { return m_id; }

	private:

		// only entity manager can modify
		friend class EntityManager;

		// data

		EntityID		m_id;

	};

} // namespace xeres
